{% extends "master.html" %}
{% block title %}{% end %}
{% block header%}
{% end %}
{% block sidebar_header %}{% end %}
{% block content_header_title%}用户{% end %}
{% block content_header_breadcrumb%}{% end %}
{% block content_body%}
{% module BoListTable("bo_listtable_users", provider) %}
{% end %}
{% block footer%}
<SCRIPT type="text/javascript">
function bo_userslist_col_render(field_name, data, type, row){
    if(field_name=="user_status"){
        if(data==1){
            return '激活';
        }
        return '已禁用';
    }
    return data;
}
function bo_userslist_getone_after_row_action(rsp, params, api_url){
    if(params['action_name'] == 'get'){
        bo_listtable_users_js_datatables.show('form');
        bo_listtable_users_js_datatables.fill_form(rsp.data);
        user_roles_select2.val(rsp.data['user_roles']).trigger("change");
    }
    return false;
}
var user_roles_select2 = null;
$(function(){
    var roles_sel = $('#roles');
    roles_sel.attr('multiple', 'multiple');
    roles_sel.attr('style', 'width:100%');
    user_roles_select2 = roles_sel.select2({});
    user_roles_select2.val([]).trigger("change");
});

</SCRIPT>
{% end %}